#include "kurcaci.h"
#include "kurcaciharvest.h"
#include "kurcaciwater.h"
#include "kurcacislash.h"
#include "field.h"
#include "player.h"


#include <iostream>
using namespace std;

int main() {
	
	field* afield  = new field();
	player* aplayer = new player();
	KurcaciHarvest* akurcharvest = new KurcaciHarvest();
	KurcaciWater* akurcwater = new KurcaciWater();
	KurcaciSlash* akurcslash = new KurcaciSlash();
	aplayer->setName("afawf");
	aplayer->setMoney(300);//default money 300
	aplayer->setArea(0);//default muncul di home
	aplayer->setpos(0,0);
	aplayer->setFace(3);
	akurcharvest->setpos(10,0);
	akurcharvest->setFace(3);
	akurcharvest->Wake();
	akurcwater->setpos(11,0);
	akurcwater->setFace(3);
	akurcwater->Wake();
	akurcslash->setpos(12,0);
	akurcslash->setFace(3);
	akurcslash->Wake();
	string s;
	cin >> s;
	char c;
	while(s!="a"){
		akurcharvest->walk(aplayer,afield,aplayer->getpos().x,aplayer->getpos().y,akurcwater->GetX(),akurcwater->GetY(),akurcharvest->GetX(),akurcharvest->GetY(),akurcslash->GetX(),akurcslash->GetY());
		afield->Display((aplayer->getpos()).x,(aplayer->getpos()).y,aplayer->getFace(),akurcharvest->GetX(),akurcharvest->GetY(),akurcharvest->getFace(),akurcwater->GetX(),akurcwater->GetY(),akurcwater->getFace(),akurcslash->GetX(),akurcslash->GetY(),akurcslash->getFace());
		cin>> s;
	}
}